In a typical virtual machine environment, multiple virtual machines or “partitions” run on top of virtualizing software. This software, in turn, runs on top of hardware. The virtualizing software exposes the hardware in such a fashion that allows for a plurality of partitions, each with its own operating system (OS), to run on the hardware. The hardware is thus virtualized for the partitions by the virtualizing software.
Individual partitions are able to run disparate OSes, such as Windows, Linux, Solaris, MacOS and so on. These OSes can be isolated from each other such that if one OS in a partition crashes it will not affect other OSes in other partitions. Additionally, allowing multiple OSes to run on a single piece of hardware but in different partitions makes it easy to run different versions of software developed for different versions or types of OSes.
With regard to graphics programs running in various partitions, graphics resources for such programs should be sharable between the various partitions. Graphics resources include surfaces, textures, vertex buffers, index buffers, etc., that are used to render scenes. Applications need to create, load, copy, and use such resources. For example, textures are a powerful tool in creating realism in computer-generated 3-D images. Early computer-generated 3-D images, although generally advanced for their time, tended to have a shiny plastic look. They lacked the types of markings, such as scuffs, cracks, fingerprints, and smudges, that give 3-D objects realistic visual complexity. Some programs support an extensive texturing feature set, providing developers with easy access to advanced texturing techniques.
As another example, vertex buffers, which may be represented by some interface, are memory buffers that contain vertex data. Vertex buffers can contain any vertex type, transformed or untransformed, lit or unlit, that can be rendered through the use of the rendering methods. The vertices can be processed in a vertex buffer to perform operations such as transformation, lighting, or generating clipping flags. The flexibility of vertex buffers make them ideal staging points for reusing transformed geometry. Of course, textures and vertex buffers are merely two examples of graphics resources. As mentioned, surfaces, index buffers, and other graphics resources are contemplated herein, as those of ordinary skill in the art would readily recognize. An important problem lies in making sure that various partitions in a virtual machine environment have the appropriate access to such graphics resources.